package com.changan.system.controller;


import com.changan.response.Result;
import com.changan.system.service.LoginService;
import com.changan.system.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 后台用户信息 前端控制器
 * </p>
 *
 * @author ange
 * @since 2020-09-05
 */
@Api(tags = "系统模块")
@RestController
@RequestMapping("/system/sys-user")
@CrossOrigin
public class SysUserController {

    @Resource
    private LoginService loginService;

    @ApiOperation(value = "用户登录",notes = "使用OpenFeign调用用户的登录方法")
    @GetMapping("/login")
    public Result login(String mobile,String mobile_psw){
       return loginService.login(mobile,mobile_psw);
    }
}

